\(\int (d+e x)^2 \sqrt {a+c x^2} \, dx\) [527]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 19, antiderivative size = 119 \[ \int (d+e x)^2 \sqrt {a+c x^2} \, dx=\frac {\left (4 c d^2-a e^2\right ) x \sqrt {a+c x^2}}{8 c}+\frac {5 d e \left (a+c x^2\right )^{3/2}}{12 c}+\frac {e (d+e x) \left (a+c x^2\right )^{3/2}}{4 c}+\frac {a \left (4 c d^2-a e^2\right ) \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{8 c^{3/2}} \]

[Out]

5/12*d*e*(c*x^2+a)^(3/2)/c+1/4*e*(e*x+d)*(c*x^2+a)^(3/2)/c+1/8*a*(-a*e^2+4*c*d^2)*arctanh(x*c^(1/2)/(c*x^2+a)^
(1/2))/c^(3/2)+1/8*(-a*e^2+4*c*d^2)*x*(c*x^2+a)^(1/2)/c

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {757, 655, 201, 223, 212} \[ \int (d+e x)^2 \sqrt {a+c x^2} \, dx=\frac {a \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) \left (4 c d^2-a e^2\right )}{8 c^{3/2}}+\frac {x \sqrt {a+c x^2} \left (4 c d^2-a e^2\right )}{8 c}+\frac {5 d e \left (a+c x^2\right )^{3/2}}{12 c}+\frac {e \left (a+c x^2\right )^{3/2} (d+e x)}{4 c} \]

[In]

Int[(d + e*x)^2*Sqrt[a + c*x^2],x]

[Out]

((4*c*d^2 - a*e^2)*x*Sqrt[a + c*x^2])/(8*c) + (5*d*e*(a + c*x^2)^(3/2))/(12*c) + (e*(d + e*x)*(a + c*x^2)^(3/2
))/(4*c) + (a*(4*c*d^2 - a*e^2)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(8*c^(3/2))

Rule 201

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^p/(n*p + 1)), x] + Dist[a*n*(p/(n*p + 1)),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 655

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[e*((a + c*x^2)^(p + 1)/(2*c*(p + 1))),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 757

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*(d + e*x)^(m - 1)*((a + c*x^2)^(p
 + 1)/(c*(m + 2*p + 1))), x] + Dist[1/(c*(m + 2*p + 1)), Int[(d + e*x)^(m - 2)*Simp[c*d^2*(m + 2*p + 1) - a*e^
2*(m - 1) + 2*c*d*e*(m + p)*x, x]*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a*e^2,
0] && If[RationalQ[m], GtQ[m, 1], SumSimplerQ[m, -2]] && NeQ[m + 2*p + 1, 0] && IntQuadraticQ[a, 0, c, d, e, m
, p, x]

Rubi steps \begin{align*} \text {integral}& = \frac {e (d+e x) \left (a+c x^2\right )^{3/2}}{4 c}+\frac {\int \left (4 c d^2-a e^2+5 c d e x\right ) \sqrt {a+c x^2} \, dx}{4 c} \\ & = \frac {5 d e \left (a+c x^2\right )^{3/2}}{12 c}+\frac {e (d+e x) \left (a+c x^2\right )^{3/2}}{4 c}+\frac {\left (4 c d^2-a e^2\right ) \int \sqrt {a+c x^2} \, dx}{4 c} \\ & = \frac {\left (4 c d^2-a e^2\right ) x \sqrt {a+c x^2}}{8 c}+\frac {5 d e \left (a+c x^2\right )^{3/2}}{12 c}+\frac {e (d+e x) \left (a+c x^2\right )^{3/2}}{4 c}+\frac {\left (a \left (4 c d^2-a e^2\right )\right ) \int \frac {1}{\sqrt {a+c x^2}} \, dx}{8 c} \\ & = \frac {\left (4 c d^2-a e^2\right ) x \sqrt {a+c x^2}}{8 c}+\frac {5 d e \left (a+c x^2\right )^{3/2}}{12 c}+\frac {e (d+e x) \left (a+c x^2\right )^{3/2}}{4 c}+\frac {\left (a \left (4 c d^2-a e^2\right )\right ) \text {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{8 c} \\ & = \frac {\left (4 c d^2-a e^2\right ) x \sqrt {a+c x^2}}{8 c}+\frac {5 d e \left (a+c x^2\right )^{3/2}}{12 c}+\frac {e (d+e x) \left (a+c x^2\right )^{3/2}}{4 c}+\frac {a \left (4 c d^2-a e^2\right ) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{8 c^{3/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.34 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.83 \[ \int (d+e x)^2 \sqrt {a+c x^2} \, dx=\frac {\sqrt {a+c x^2} \left (16 a d e+12 c d^2 x+3 a e^2 x+16 c d e x^2+6 c e^2 x^3\right )}{24 c}+\frac {a \left (-4 c d^2+a e^2\right ) \log \left (-\sqrt {c} x+\sqrt {a+c x^2}\right )}{8 c^{3/2}} \]

[In]

Integrate[(d + e*x)^2*Sqrt[a + c*x^2],x]

[Out]

(Sqrt[a + c*x^2]*(16*a*d*e + 12*c*d^2*x + 3*a*e^2*x + 16*c*d*e*x^2 + 6*c*e^2*x^3))/(24*c) + (a*(-4*c*d^2 + a*e
^2)*Log[-(Sqrt[c]*x) + Sqrt[a + c*x^2]])/(8*c^(3/2))

Maple [A] (verified)

Time = 2.37 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.73

method result size
risch \(\frac {\left (6 c \,e^{2} x^{3}+16 c d e \,x^{2}+3 a \,e^{2} x +12 c \,d^{2} x +16 a d e \right ) \sqrt {c \,x^{2}+a}}{24 c}-\frac {a \left (e^{2} a -4 c \,d^{2}\right ) \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{8 c^{\frac {3}{2}}}\) \(87\)
default \(d^{2} \left (\frac {x \sqrt {c \,x^{2}+a}}{2}+\frac {a \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{2 \sqrt {c}}\right )+e^{2} \left (\frac {x \left (c \,x^{2}+a \right )^{\frac {3}{2}}}{4 c}-\frac {a \left (\frac {x \sqrt {c \,x^{2}+a}}{2}+\frac {a \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{2 \sqrt {c}}\right )}{4 c}\right )+\frac {2 d e \left (c \,x^{2}+a \right )^{\frac {3}{2}}}{3 c}\) \(118\)

[In]

int((e*x+d)^2*(c*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/24*(6*c*e^2*x^3+16*c*d*e*x^2+3*a*e^2*x+12*c*d^2*x+16*a*d*e)*(c*x^2+a)^(1/2)/c-1/8*a*(a*e^2-4*c*d^2)/c^(3/2)*
ln(c^(1/2)*x+(c*x^2+a)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.80 \[ \int (d+e x)^2 \sqrt {a+c x^2} \, dx=\left [-\frac {3 \, {\left (4 \, a c d^{2} - a^{2} e^{2}\right )} \sqrt {c} \log \left (-2 \, c x^{2} + 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) - 2 \, {\left (6 \, c^{2} e^{2} x^{3} + 16 \, c^{2} d e x^{2} + 16 \, a c d e + 3 \, {\left (4 \, c^{2} d^{2} + a c e^{2}\right )} x\right )} \sqrt {c x^{2} + a}}{48 \, c^{2}}, -\frac {3 \, {\left (4 \, a c d^{2} - a^{2} e^{2}\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) - {\left (6 \, c^{2} e^{2} x^{3} + 16 \, c^{2} d e x^{2} + 16 \, a c d e + 3 \, {\left (4 \, c^{2} d^{2} + a c e^{2}\right )} x\right )} \sqrt {c x^{2} + a}}{24 \, c^{2}}\right ] \]

[In]

integrate((e*x+d)^2*(c*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/48*(3*(4*a*c*d^2 - a^2*e^2)*sqrt(c)*log(-2*c*x^2 + 2*sqrt(c*x^2 + a)*sqrt(c)*x - a) - 2*(6*c^2*e^2*x^3 + 1
6*c^2*d*e*x^2 + 16*a*c*d*e + 3*(4*c^2*d^2 + a*c*e^2)*x)*sqrt(c*x^2 + a))/c^2, -1/24*(3*(4*a*c*d^2 - a^2*e^2)*s
qrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)) - (6*c^2*e^2*x^3 + 16*c^2*d*e*x^2 + 16*a*c*d*e + 3*(4*c^2*d^2 + a*c
*e^2)*x)*sqrt(c*x^2 + a))/c^2]

Sympy [A] (verification not implemented)

Time = 0.47 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.17 \[ \int (d+e x)^2 \sqrt {a+c x^2} \, dx=\begin {cases} \sqrt {a + c x^{2}} \cdot \left (\frac {2 a d e}{3 c} + \frac {2 d e x^{2}}{3} + \frac {e^{2} x^{3}}{4} + \frac {x \left (\frac {a e^{2}}{4} + c d^{2}\right )}{2 c}\right ) + \left (a d^{2} - \frac {a \left (\frac {a e^{2}}{4} + c d^{2}\right )}{2 c}\right ) \left (\begin {cases} \frac {\log {\left (2 \sqrt {c} \sqrt {a + c x^{2}} + 2 c x \right )}}{\sqrt {c}} & \text {for}\: a \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {c x^{2}}} & \text {otherwise} \end {cases}\right ) & \text {for}\: c \neq 0 \\\sqrt {a} \left (\begin {cases} d^{2} x & \text {for}\: e = 0 \\\frac {\left (d + e x\right )^{3}}{3 e} & \text {otherwise} \end {cases}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((e*x+d)**2*(c*x**2+a)**(1/2),x)

[Out]

Piecewise((sqrt(a + c*x**2)*(2*a*d*e/(3*c) + 2*d*e*x**2/3 + e**2*x**3/4 + x*(a*e**2/4 + c*d**2)/(2*c)) + (a*d*
*2 - a*(a*e**2/4 + c*d**2)/(2*c))*Piecewise((log(2*sqrt(c)*sqrt(a + c*x**2) + 2*c*x)/sqrt(c), Ne(a, 0)), (x*lo
g(x)/sqrt(c*x**2), True)), Ne(c, 0)), (sqrt(a)*Piecewise((d**2*x, Eq(e, 0)), ((d + e*x)**3/(3*e), True)), True
))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.90 \[ \int (d+e x)^2 \sqrt {a+c x^2} \, dx=\frac {1}{2} \, \sqrt {c x^{2} + a} d^{2} x + \frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} e^{2} x}{4 \, c} - \frac {\sqrt {c x^{2} + a} a e^{2} x}{8 \, c} + \frac {a d^{2} \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{2 \, \sqrt {c}} - \frac {a^{2} e^{2} \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{8 \, c^{\frac {3}{2}}} + \frac {2 \, {\left (c x^{2} + a\right )}^{\frac {3}{2}} d e}{3 \, c} \]

[In]

integrate((e*x+d)^2*(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(c*x^2 + a)*d^2*x + 1/4*(c*x^2 + a)^(3/2)*e^2*x/c - 1/8*sqrt(c*x^2 + a)*a*e^2*x/c + 1/2*a*d^2*arcsinh(
c*x/sqrt(a*c))/sqrt(c) - 1/8*a^2*e^2*arcsinh(c*x/sqrt(a*c))/c^(3/2) + 2/3*(c*x^2 + a)^(3/2)*d*e/c

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.82 \[ \int (d+e x)^2 \sqrt {a+c x^2} \, dx=\frac {1}{24} \, \sqrt {c x^{2} + a} {\left (\frac {16 \, a d e}{c} + {\left (2 \, {\left (3 \, e^{2} x + 8 \, d e\right )} x + \frac {3 \, {\left (4 \, c^{2} d^{2} + a c e^{2}\right )}}{c^{2}}\right )} x\right )} - \frac {{\left (4 \, a c d^{2} - a^{2} e^{2}\right )} \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + a} \right |}\right )}{8 \, c^{\frac {3}{2}}} \]

[In]

integrate((e*x+d)^2*(c*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/24*sqrt(c*x^2 + a)*(16*a*d*e/c + (2*(3*e^2*x + 8*d*e)*x + 3*(4*c^2*d^2 + a*c*e^2)/c^2)*x) - 1/8*(4*a*c*d^2 -
 a^2*e^2)*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(3/2)

Mupad [F(-1)]

Timed out. \[ \int (d+e x)^2 \sqrt {a+c x^2} \, dx=\int \sqrt {c\,x^2+a}\,{\left (d+e\,x\right )}^2 \,d x \]

[In]

int((a + c*x^2)^(1/2)*(d + e*x)^2,x)

[Out]

int((a + c*x^2)^(1/2)*(d + e*x)^2, x)